import service from "@api/request";

/* 登录验证接口
   postdata: 登录框提交的数据
   return：Promise格式数据
*/
export const GetUserInfo = (postdata) => {
    return service({
            method: 'post',
            url: 'loginAPI/login',
            data: postdata
        })
        .then(response => response.data)
        .catch(error => console.log(error));
}

export const GetUser = () => {
    return service({
            method: 'post',
            url: 'loginAPI/getUser',
            data: '',
    })
    .then(response=> response.data)
    .catch(error => console.log(error));
}

